package com.finir.fakturisanje.domain.beans;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import com.finir.fakturisanje.domain.Faktura;
import com.finir.fakturisanje.domain.PoreskaTarifa;
import com.finir.fakturisanje.domain.StavkaFakture;
import com.finir.fakturisanje.domain.Usluga;

/*     */ @Entity
/*     */ public class StavkaFaktureBean
/*     */   implements Serializable, StavkaFakture
/*     */ {
/*     */   private static final long serialVersionUID = 1L;
/*     */   private Long id;
/*     */   private Integer rb;
/*     */   private String jedinicaMere;
/*     */   private PoreskaTarifa poreskaTarifa;
/*     */   private Double cena;
/*     */   private Double vrednost;
/*     */   private Double kolicina;
/*     */   private Faktura faktura;
/*     */   private Usluga usluga;
/*     */   private String opis;
/*     */ 
/*     */   public String getOpis()
/*     */   {
/*  37 */     return this.opis;
/*     */   }
/*     */ 
/*     */   public void setOpis(String opis) {
/*  41 */     this.opis = opis;
/*     */   }
/*     */ 
/*     */   @ManyToOne(targetEntity=UslugaBean.class)
/*     */   public Usluga getUsluga() {
/*  46 */     return this.usluga;
/*     */   }
/*     */ 
/*     */   public void setUsluga(Usluga usluga) {
/*  50 */     this.usluga = usluga;
/*     */   }
/*     */ 
/*     */   @Id
/*     */   @GeneratedValue(strategy=GenerationType.AUTO)
/*     */   public Long getId() {
/*  56 */     return this.id;
/*     */   }
/*     */ 
/*     */   public void setId(Long id)
/*     */   {
/*  65 */     this.id = id;
/*     */   }
/*     */ 
/*     */   public Integer getRb()
/*     */   {
/*  74 */     return this.rb;
/*     */   }
/*     */ 
/*     */   public void setRb(Integer rb)
/*     */   {
/*  83 */     this.rb = rb;
/*     */   }
/*     */ 
/*     */   public String getJedinicaMere()
/*     */   {
/*  92 */     return this.jedinicaMere;
/*     */   }
/*     */ 
/*     */   public void setJedinicaMere(String jedinicaMere)
/*     */   {
/* 101 */     this.jedinicaMere = jedinicaMere;
/*     */   }
/*     */ 
/*     */   @ManyToOne(targetEntity=PoreskaTarifaBean.class)
/*     */   public PoreskaTarifa getPoreskaTarifa()
/*     */   {
/* 111 */     return this.poreskaTarifa;
/*     */   }
/*     */ 
/*     */   public void setPoreskaTarifa(PoreskaTarifa poreskaTarifa)
/*     */   {
/* 120 */     this.poreskaTarifa = poreskaTarifa;
/*     */   }
/*     */ 
/*     */   public Double getCena()
/*     */   {
/* 129 */     return this.cena;
/*     */   }
/*     */ 
/*     */   public void setCena(Double cena)
/*     */   {
/* 138 */     this.cena = cena;
/*     */   }
/*     */ 
/*     */   public Double getVrednost()
/*     */   {
/* 147 */     return this.vrednost;
/*     */   }
/*     */ 
/*     */   public void setVrednost(Double vrednost)
/*     */   {
/* 156 */     this.vrednost = vrednost;
/*     */   }
/*     */ 
/*     */   public Double getKolicina()
/*     */   {
/* 165 */     return this.kolicina;
/*     */   }
/*     */ 
/*     */   public void setKolicina(Double kolicina)
/*     */   {
/* 174 */     this.kolicina = kolicina;
/*     */   }
/*     */ 
/*     */   @ManyToOne(targetEntity=FakturaBean.class)
/*     */   @JoinColumn(nullable=false)
/*     */   public Faktura getFaktura()
/*     */   {
/* 185 */     return this.faktura;
/*     */   }
/*     */ 
/*     */   public void setFaktura(Faktura faktura)
/*     */   {
/* 194 */     this.faktura = faktura;
/*     */   }
/*     */ 
/*     */   public int hashCode()
/*     */   {
/* 199 */     int hash = 0;
/* 200 */     hash += ((this.id != null) ? this.id.hashCode() : 0);
/* 201 */     return hash;
/*     */   }
/*     */ 
/*     */   public boolean equals(Object object)
/*     */   {
/* 208 */     if (!(object instanceof StavkaFaktureBean))
/* 209 */       return false;
/*     */ 
/* 211 */     StavkaFaktureBean other = (StavkaFaktureBean)object;
/*     */ 
/* 214 */     return ((((this.id != null) || (other.id == null))) && ((
/* 213 */       (this.id == null) || (this.id.equals(other.id)))));
/*     */   }
/*     */ 
/*     */   public String toString()
/*     */   {
/* 222 */     return "stavka id = " + this.id + " rb=" + this.rb;
/*     */   }
/*     */ }